﻿namespace Ipmce.RemoteVoting.Common.Tools.CardReader.ImageParsing
{
	class BiometricHeader : LdsTagElement
	{
		public BiometricHeader(int i)
			: base(BioInfoTags.BiometricHeader(i), false, null, false)
		{
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffHeaderVersion, 2, true));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffBiometricType, 1, true));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffBiometricFeature, 1, true));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffCreationDateAndTime, 7, true));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffValidityPeriod, 8, true));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffCreatorOfTheBiometricReferenceData, 2, true));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffFormatOwner, 2));
			Children.Add(new ByteArrayWithTag(BioInfoTags.CbeffFormatType, 2));
		}

		public BiometricHeader(int i, params ByteArrayWithTag[] children)
			: base(BioInfoTags.BiometricHeader(i), false, null, false)
		{
			foreach (var child in children)
				Children.Add(child);
		}
	}
}